# Copyright (c) 2025 Li Auto Inc. and its affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# build.mk
#

# MVBS_TEST_FW_DISABLE:=true

LOCAL_PATH:= $(call my-dir)
###############################multi_topic_test_app1#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=multi_topic_test_app1

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= multi_topic_test/app1/app1_test.c

LOCAL_CFG_FILES:= multi_topic_test/app1/app1_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################multi_topic_test_app1#########################################

###############################multi_topic_test_app2#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=multi_topic_test_app2

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= multi_topic_test/app2/app2_test.c

LOCAL_CFG_FILES:= multi_topic_test/app2/app2_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################multi_topic_test_app2#########################################

###############################udp_test_pub#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=udp_test_pub

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= udp_test/pub/pub_test.c

LOCAL_CFG_FILES:= udp_test/pub/pub_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################udp_test_pub#########################################

###############################udp_test_sub#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=udp_test_sub

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= udp_test/sub/sub_test.c

LOCAL_CFG_FILES:= udp_test/sub/sub_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################udp_test_sub#########################################

###############################rte_interface_test_pub#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=rte_interface_test_pub

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= rte_interface_test/pub/pub_test.c

LOCAL_CFG_FILES:= rte_interface_test/pub/pub_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################rte_interface_test_pub#########################################

###############################rte_interface_test_sub#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=rte_interface_test_sub

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= rte_interface_test/sub/sub_test.c

LOCAL_CFG_FILES:= rte_interface_test/sub/sub_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################rte_interface_test_sub#########################################

###############################local_test#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=local_test_app

LOCAL_IDL_FILES:=$(call all-named-files-under,*.idl,idl/)

LOCAL_SRCS:= local_test/app_test.c

LOCAL_CFG_FILES:= local_test/app_config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################local_test#########################################

###############################rpc_test_server#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=rpc_test_server

LOCAL_RPC_FILES:=$(call all-named-files-under,*.idl,rpc_test/)

LOCAL_SRCS:= rpc_test/server.c

LOCAL_MODULE_TARGETS:= LINUX

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################rpc_test_server#########################################

###############################rpc_test_client#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=rpc_test_client

LOCAL_RPC_FILES:=$(call all-named-files-under,*.idl,rpc_test/)

LOCAL_SRCS:= rpc_test/client.c

LOCAL_MODULE_TARGETS:= LINUX

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################rpc_test_client#########################################

###############################vbslite_perf_demo_app1#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=vbslite_perf_demo_app1

LOCAL_IDL_FILES+=idl/vbslite_perf_demo.idl \

LOCAL_SRCS:= vbslite_perf_demo/demo_app1/app.c

LOCAL_CFG_FILES:=vbslite_perf_demo/demo_app1/Node1_Config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a

include $(BUILD_EXECUTABLE)
###############################vbslite_perf_demo_app1#########################################

###############################vbslite_perf_demo_app2#########################################
include $(CLEAR_VARS)

LOCAL_MODULE:=vbslite_perf_demo_app2

LOCAL_IDL_FILES+=idl/vbslite_perf_demo.idl \

LOCAL_SRCS:=vbslite_perf_demo/demo_app2/app.c

LOCAL_CFG_FILES:=vbslite_perf_demo/demo_app2/Node2_Config.xml

LOCAL_MODULE_TARGETS:= LINUX MINGW

LOCAL_STATIC_LIBRARIES:= libmvbs.a
LOCAL_STATIC_LIBRARIES_MINGW:= libmvbs_aux.a
LOCAL_STATIC_LIBRARIES_LINUX:= libmvbs_aux.a


include $(BUILD_EXECUTABLE)
###############################vbslite_perf_demo_app2#########################################
